Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-syntax-logical-assignment-operators

Package Overview
Dependencies
Maintainers
6
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-logical-assignment-operators

Allow parsing of the logical assignment operators

  • 7.10.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25M
decreased by-5.34%
Maintainers
6
Weekly downloads
 
Created

What is @babel/plugin-syntax-logical-assignment-operators?

The @babel/plugin-syntax-logical-assignment-operators package allows Babel to parse code that uses logical assignment operators. These operators combine logical operations with assignment expressions. This plugin only enables the syntax, and does not transform it. To transform the code, you would need to use another plugin or set of plugins that handle the transformation.

What are @babel/plugin-syntax-logical-assignment-operators's main functionalities?

Logical AND Assignment (&&=)

The logical AND assignment (&&=) operator only assigns the value of the right operand to the left operand if the left operand is truthy.

a &&= b;

Logical OR Assignment (||=)

The logical OR assignment (||=) operator assigns the value of the right operand to the left operand if the left operand is falsy.

a ||= b;

Logical Nullish Assignment (??=)

The logical nullish assignment (??=) operator assigns the value of the right operand to the left operand if the left operand is null or undefined.

a ??= b;

Other packages similar to @babel/plugin-syntax-logical-assignment-operators

Keywords

FAQs

Package last updated on 30 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc